import {postRequest} from 'components/functions';
const { export_json_to_excel } = require('/vendor/Export2Excel');
export function exportReport (param,) {
  // postRequest('/transaction/price/caculateList',param,(res) => {
  //   const addRules = param.addRules;
  //   let title = ["品牌","车型"]
  //   for(let item in addRules){
  //     title.push(addRules[item].name)
  //   }
  //   if (true) {
  //
  //   }
  //
  // });
  const res = [
    {
      "品牌": "宝马",
      "佣金价": "1845100.0",
      "车系": "宝马7系"
    },
    {
      "品牌": "宝马",
      "佣金价": "855700.0",
      "车系": "宝马Z4"
    }
  ]
  const title = ["品牌","车系","佣金价"]
  alert(1)
  require.ensure([], () => {
    export_json_to_excel("导出报价", res, title)
  })
  alert(2)
}
